print(1)
set1 = {1, 2, 3, 4, 5, 6}  # 集合的创建
print(set1)
print(type(set1))

set2 = set([4, 5, 6])
print(set2)
print(type(set2))

set3 = set()
print(set3)
print(type(set3))
print()

print(2)
set4 = set1 - set2
print(set4)
print(set1 | set2)
print(set1 & set2)
print(set1 ^ set2)
print()

print(3)
a = {x for x in 'abcdef' if x not in 'abc'}
print(a)
print()

print(4)
list1 = [7, 8, 9]
a1 = {1, 2, 3, 4, 5}
a2 = {1, 2, 3, 'a', 'b'}
a1.add(6)
print(a1)
a2.update(list1)
print(a2)
print()

print(5)
print(a2)
a2.discard(7)
print(a2)
a2.remove(8)
print(a2)
a2.pop()
print(a2)
print()

print(6)
print(len(a1))
a2.clear()
print(len(a2))
print()

print(7)
print(1 in a1)
